import {usePermission} from "@/composables/use-permission.js";

/**
 * v-permission 指令
 * 用法： v-permission="'delete'"
 */
export default {
    mounted(el, binding) {
        if (!usePermission().hasPermission(binding.value)) {
            el.parentNode && el.parentNode.removeChild(el);
        }
    }
};
